The present invention relates to a computer system, and in particular, to a virtual storage control unit in a computer system including two external storages having mutually different processing speeds.
Recently, in practical use, there has been a computer system adopting a virtual storage system in which as for an extended storage configuration, there is disposed, in addition to a magnetic disk unit or a direct access storage device, an extended storage which can be accessed at a higher speed as compared with the magnetic disk. FIG. 1 shows an example of the constitution of a conventional virtual storage control unit employed in such a computer system above.
The system of FIG. 1 includes a main storage 101, an extended storage 102, a direct access storage device 103, a virtual storage 104, and a virtual storage control unit 10. The controller 10 includes a page-in processing 11 for transferring in page units the contents of the virtual storage 104 from the storage 102 or the device 103 (the storage 104 and the device 103 will be collectively called an external storage herebelow) to the main storage 101, a page-out processing 12 for transferring in page units the contents of the virtual storage 104 from the main storage 101 to the external storage, a swap processing 13 for transferring in space units the contents of the virtual storage 104 between the main storage 101 and the external storage, a migration processing 14 for transferring the contents of the virtual storage 104 from the extended storage 102 to the device 103, and an extended storage management processing 15 for managing areas of the extended storage 102. In this regard, a term "page in" implies to transfer in page units the contents of the virtual storage 104 from the external storage to the main storage 101. Conversely, a term "page out" means to move in page units the contents of the virtual storage 104 from the main storage 101 to the external storage. In addition, a term "migration" designates to move the contents of the virtual storage 104 from the extended storage 102 to the random access storage device 103.
A virtual storage system in a computer system including extended storages as above has been described, for example, in the JP-A-63-20552.
FIG. 2 shows a flowchart of operation in the migration of a virtual storage system in the prior art. Each time an available area of the storage 102 is assigned to a page of the virtual storage (step 201), the migration processing 14 checks a capacity of free space of the extended storage 102 (step 202). When the free space capacity becomes equal to or less than a predetermined value, a portion of the reserved area of the storage 102 is transferred via a portion of the main storage 101 to be saved in the device 103, thereby keeping the free area of the storage 102 at least equal the fixed value (step 203). In an operation to move a page form the main storage 101 to the external storage 102 or 103, when the storage 102 has a free area, the page-out processing 12 assigns the available area to the page so as to output the contents of the page from the storage 101 to the storage 102. In a case where the storage 102 cannot afford such an available area for the page, the contents of the page are outputted to the storage device 103. In the processing to achieve a page-in operation for the storage contents not existing in the storage 101, the page-in processing 11 first examines the contents of the storage 102. If the storage 102 contains a page to be subjected to the page-in, data of the contents of the page is transferred therefrom to the main storage 101.
A technology related to the extended storage management processing 115 has been described in the JP-A-63-128454. An extended storage management table to manage each page of the extended storage 102 is queued in a queue 16 to which a table entry 18 being used is registered and a queue 17 to which an available (free) table entry 19 is registered. At allocation of an extended storage area, the first entry (on the right side in the diagram) is selected from the queue 17 and is then moved to the last position (on the left side in FIG. 1) of the queue 16. Moreover, in a migration, the first entry 17 is selected from the queue 16 to be set to a free state and is then moved to the last position of the queue 17.
Furthermore, in an article "Paging Algorithm using Extended Storage--Its Design and Evaluation" (the Information Processing Society, OS Study Group, Mar. 15, 1991), there has been described an extended storage page frame release function to release an area of an extended storage during a page-in operation so as to expand an effective capacity of the extended storage.
In addition, in page 131 of an HITAC Manual "Center Operation" (6180-3-101-10), there has been described characteristics of areas related to swap-in and swap-out operations. Namely, for a space undergone a swap-out operation due to an insufficient capacity of the main storage, a swap recommendation value becomes to be larger with a lapse of time and hence the space is likely to be subjected to a swap-in operation; whereas, for a space undergone a swap-out operation due to a wait for an input from a terminal, the chance to undergo a swap-in operation is reduced with a lapse of time. In this regard, a swap-out operation denotes to move all pages in the main storage assigned to a virtual space in a multi virtual storage system from the main storage to an external storage. A swap-in operation designates an operation reverse thereto.
According to the prior art, a migration takes place when the amount of free areas of the extended storage becomes equal to or less than a predetermined value. In a case where the amount of free areas to commence the migration is set to a small value, when the system has a large variation in its load, the page-out operation frequently occurs at a high-load period of time and hence the free areas of the extended storage are used up in a short period of time. This leads to occurrences of page-out operations onto a direct access storage device due to a wait for allocation of free areas. As a result, there appears a page-out delay and hence the wait time for memory allocation is increased, which lowers the processing efficiency. Conversely, when the amount of free areas to commence the migration is set to a large value, a page-in operation frequently occurs from the direct access storage device to the main storage for reusable areas in the extended storage, thereby increasing the page-in time. Moreover, to improve the processing efficiency in the high-load state, if the capacity of the extended storage is increased, the volume of available area is increased in the low-load state, which deteriorates utilization efficiency of the extended storage.
Furthermore, according to the conventional migration system, there does not appear any particular problem when an area of the extended storage released due to a page-in operation is allocated to another page. However, when an area of the extended storage released due to a migration is allocated to another page, to achieve a page-in operation to move the data of the area released due to the migration to the direct access storage device, there occurs input and output operations. This leads to a problem of decrease in the processing efficiency.
In addition, according to a multi virtual storage system managing a plurality of virtual spaces or storages, for a space associated with a swap-out operation due to a wait for a terminal input, the chance of a swap-in operation is lowered as time is elapsed; whereas, for a space associated with a swap-out operation due to an insufficient capacity of the main storage, the chance of a swap-in operation is increased with a lapse of time, which causes the following problem. Namely, due to selection of areas in the extended storage for migration, when an identical algorithm is applied to these swap-in operations, the chance of the swap-in operation from the extended storage is decreased for the spaces of one of the swap-out operations.